# -*- coding: utf-8 -*-

from odoo import models, fields


class ProductCategory(models.Model):
    _inherit = 'product.category'
    
    # 成本核算相关
    overhead_allocation_rate = fields.Float(
        string='间接费用分摊率(%)',
        default=15.0,
        help='管理费用按直接成本的百分比分摊'
    )
    
    default_waste_rate = fields.Float(
        string='默认损耗率(%)',
        default=5.0,
        help='该类别产品的默认废品率'
    )
    
    # 工艺相关
    default_process_type = fields.Selection([
        ('injection', '注塑成型'),
        ('stamping', '冲压'),
        ('casting', '压铸'),
        ('machining', '机加工'),
        ('assembly', '装配'),
        ('painting', '涂装')
    ], string='默认工艺类型')

